# -*- coding: utf-8 -*-
"""
Created on Thu Jul  5 18:04:13 2018

@author: Administrator
"""

from flask import Flask, render_template, request,jsonify

import sys
from imp import reload
reload(sys)


app = Flask(__name__) 

@app.route('/api',methods=['GET'])


def getres():
        

       req_msg = request.args.get('msg', 'default value')
    
    
    
   
       res_msg = talker.talk(req_msg)

    

       return jsonify( { 'text': res_msg } )


import tensorflow as tf
from talk import talker

tk = talker()

#

# 启动APP
if (__name__ == "__main__"): 
    app.run(host = '127.0.0.1', port = 5000) 
